import { ejsCompiler } from "./vite-ejs.js";
import path from "path";
import fs from "fs";
import vm from "vm";



ejsCompiler('F:/code/html/vite-ssg/src/index.html', 'F:/code/html/vite-ssg/src/')

const code = `
  // import { add } from './a.js;
  // const { add } = require('./a.js');
  
  const result = add(1, 2);

  result;
`
import { add } from './a.js';

const ctx = { add }

const result = vm.runInNewContext(code, ctx)
console.log(result)
